-- GENERATED SPELL FOR [Blood Elf Defender] --


function spell0_8581(pUnit, Event) --@Revenge,n/a--
pUnit:FullCastSpellOnTarget(12170,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8581', 566, 1)
end

function spell1_8581(pUnit, Event) --@Shield Block,Self--
pUnit:FullCastSpellOnTarget(12169,pUnit)
pUnit:RegisterEvent('Sorts_8581', 5291, 1)
end

function Sorts_8581(pUnit, Event)
local choix_sorts_8581 = math.random(0, 1)
if choix_sorts_8581 == 0 then
pUnit:RegisterEvent('spell0_8581', 1, 1)
end
if choix_sorts_8581 == 1 then
pUnit:RegisterEvent('spell1_8581', 1, 1)
end
end

function mob8581_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8581', math.random(1500, 3000), 1)
end

function mob8581_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8581_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8581_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8581, 1, 'mob8581_Action')
RegisterUnitEvent(8581, 2, 'mob8581_Leave')
RegisterUnitEvent(8581, 3, 'mob8581_Kill')
RegisterUnitEvent(8581, 4, 'mob8581_Die')
